import request from '@/utils/request'

// 查询列表
export function listPaymentRule(query) {
  return request({
    url: '/aipay/apiRule/list',
    method: 'get',
    params: query
  })
}

export function listPaymentRuleByType(query) {
  return request({
    url: '/aipay/apiRule/type',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getPaymentRule(id) {
  return request({
    url: '/aipay/apiRule/' + id,
    method: 'get'
  })
}

// 新增
export function addPaymentRule(data) {
  return request({
    url: '/aipay/apiRule',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePaymentRule(data) {
  return request({
    url: '/aipay/apiRule',
    method: 'put',
    data: data
  })
}

// 删除
export function delPaymentRule(id) {
  return request({
    url: '/aipay/apiRule/' + id,
    method: 'delete'
  })
}
